XIQS Create Allocation Rule

From IQsimWiki

Jump to: navigation, search

XIQS Create Allocation Rule - Allocation Rule Management

Description
createXIQSAllocRule ( String name , Integer mode , String monday , String tuesday , String wednesday , String thursday , String friday , String saturday , String sunday , Long operator , Integer simmode , Integer simultaneous , Long simlease , Long callleasetime , Integer priority , Integer port , Long simchoice , Long id_portgrp , Long id_simselect , Long maxcalls , Integer conxcallonly , Integer forcereset , Integer changemaster , Integer useoffpeak , Integer usereal , Long simsleep , Long countdown , Integer complease , Integer smsallowed , Integer smsoffpeak , Integer timezone , Integer callkeeppending , [ Long id_partition ] )
Create a new Allocation Rule object for current partition
Parameters

String name

Allocation Rule Name

Integer mode

Rule disabled flag:
0 - active
2 - disabled

String monday

Define the time period during which the given rule is valid or activated. Time schedule mask for Monday, string containing 24 digits, each corresponding to one hour, starting from 00 to 23 h; put '1' if Rule has to be active in both half of hour, '2' only in the first half, '3' only in the second half or '0' if Rule has to be deactivated in both half of hour      

String tuesday

Time schedule mask for Tuesday, the same format as for Monday

String wednesday

Time schedule mask for Wednesday, the same format as for Monday

String thursday

Time schedule mask for Thursday, the same format as for Monday

String friday

Time schedule mask for Friday, the same format as for Monday

String saturday

Time schedule mask for Saturday, the same format as for Monday

String sunday

Time schedule mask for Sunday, the same format as for Monday

Long operator

GSM Network Operator PLMN (MCC+MNC) code; Only SIM cards of this provider will be used

Integer simmode

Sim choice mode:
0 - Any SIM; Select SIM cards from specific provider
1 - SIM group; Select SIM cards from specific SIM group
2 - Price Plan; Select SIM cards from specific price plans
3 - to be recharged; Select SIM cards without credit, i.e. requiring recharge
4 - to be activated; SIM cards requiring an activation

Integer simultaneous

RESERVED FOR FUTURE USAGE

Long simlease

Maximal lease time (seconds); Maximal time that will a SIM card allocated by the given rule stay on the GSM port

Long callleasetime

Maximal calling time (seconds); Maximal calling time allowed on a SIM card before it will be deallocated

Integer priority

Priority level (1 to 9, 1 the highest priority); Allocation rules with lower priority will be only applicable if those with higher priority have no SIM cards available for allocation

Integer port

RESERVED FOR FUTURE USAGE

Long simchoice

SIM preference:
0 - Best credit; Select SIM card with the highest remaining credit
2 - contract day; Select SIM card that is closest to the next recharge date
3 - idle time; Select SIM card that is idle for the longest time
4 - IRON Sim Rack; Select SIM card according to the physical location in IRON Sim Rack
5 - Lowest credit; Select SIM card with the lowest remaining credit

Long id_portgrp

Port Group Id; Only SIM cards from this Port group will be selected

Long id_simsel

Sim group Id / Price Plan Id; Only SIM cards from this Sim group or Price Plan will be selected

Long maxcalls

Maximal number of calls; Maximal number of calls allowed on SIM card before it will be deallocated

Integer conxcallonly

Connected calls only flag; Count only connected calls in MaxCalls

Integer forcereset

Force SIM deallocation; If checked, the allocated SIM card will be deallocated by Sim Manager from GSM ports whenever it swaps from peak to off-peak period or vice-versa. Such deallocations will be imposed even if SIM is used for the active call

Integer changemaster

Next allocation forced to another site; If checked SIM card will be forbidden from being allocated twice consecutive to the GSM port on the same Gateway

Integer useoffpeak

Allocation call billing period; Determine if the billing increment of the given allocation rule is peak, off-peak or bonus value:
0 - Call peak
1 - Call off peak
2 - Call bonus

Integer usereal

Callleasetime type, Billing or Real time: 
0 - Billing time
1 - Real time

Long simsleep

Minimal sleeping/traveling time (seconds); The minimal time that the Sim Manager will force SIM card to stay unallocated in sleeping or traveling state, after it is deallocated from GSM port

Long countdown

Start SIM change in advance (seconds); Deallocate SIM cards ahead of their scheduled release time

Integer complease

Force to complete time flag

Integer smsallowed

Allocation route allowed for:
0 - Call only
1 - SMS only
2 - Call & SMS

Integer smsoffpeak

Allocation SMS billing period:
0 - Call peak
1 - Call off peak
2 - Call bonus

Integer timezone

-

Integer callkeeppending

-

[ Long id_partition ]

Partition Id
Return Values
Structure
Integer id_rule - Allocation Rule Id

Error Data structure ( Error Management )

Possible failure code returns
*ERR_OBJ_NOT_FOUND (404) ERR_MSG_ARUL_NOT_FOUND
*ERR_UNAUTHORIZED (401) ERR_MSG_OBJ_NOT_OWNED
*ERR_SRV_INTERNAL (500) ERR_MSG_NO_DB
See Also

getXIQSAllocRuleList

updateXIQSAllocRule

deleteXIQSAllocRule

Personal tools
Namespaces
Variants
Views
Actions
Navigation
XIQS XML Protocol
XIQS Framework Libraries
XIQS Command List